import Base from './base'
const api = new Base()

export const addMovie = (data: any) => api.post('/movie', data)
export const updateMovie = (data: any) => api.patch(`/movie/${data.id}`, data)
export const delMovie = (id: string) => api.delete(`/movie/${id}`)
export const getMovieList = (data: any) => api.get('/movie/page', data)
export const getMovieRecommend = (data: any) => api.get('/movie/recommend', data)
export const getMovie = (id: string) => api.get(`/movie/${id}`)

export const addCollect = (movieId: string) => api.post(`/movieCollect/collect/${movieId}`)
export const delCollect = (movieId: string) => api.post(`/movieCollect/cancelCollect/${movieId}`)
export const getCollectList = () => api.get('/movieCollect/page')
export const getCollectByUser = () => api.get(`/movieCollect/myPage`)


export const addPrize = (movieId: string) => api.post(`/moviePrize/${movieId}`)
export const delPrize = (movieId: string) => api.post(`/moviePrize/cancel/${movieId}`)


export const addComment = (data: any) => api.post('/movieComment/comment', data)


export const getComments = (data: any) => api.get('/movieComment/page', data)
export const delComments = (id: string) => api.delete(`/movieComment/delete/${id}`)



export const getRules = (data:any) => api.get('/sysTenantRule/page', data)

export const sendScore = (data:any) => api.post('/movieUserScore', data)

